<?php
/**
 * Created by PhpStorm.
 * Admininfo: Administrator
 * Date: 2018/3/22
 * Time: 11:54
 */
namespace app\common\validate;
use think\Validate;
class Message extends  Validate{
    protected $rule=[
        'username'=>['require','max:6','min:2'],
        'userphone'=>['require','/^1[345678]\d{9}$/'],
        'content'=>['require']
    ];
    //验证不符返回msg
    protected $message  =   [
        'username.require'   => '姓名必须填写！',
        'username.min'   => '姓名最短2位!',
        'username.max'   => '姓名最长6位!',
        'userphone.require'   => '手机号必须填写！',
        'userphone'   => '手机号格式错误,请输入正确的手机号！',
        'content.require'   => '需求信息不能为空！',
    ];

}